routeNotificationFor(static::via); $o = $this->setupEchomail($echoarea); Log::info(sprintf('%s:+ Sending Matrix Message to [%s]',self::LOGKEY,$echoarea->name),['mo'=>$this->mo]); $our = our_address($echoarea->domain)->last(); $o->to = 'All'; $o->from = $this->mo->sender; $o->datetime = Carbon::createFromTimestampMs($this->mo->ts); $o->subject = $this->mo->topic; $o->fftn_id = $our->id; $o->kludges->put('CHRS:','UTF-8 4'); $o->kludges->put('EVENT:',$this->mo->event_id); // Message $o->msg = str_replace("\n","\r",$this->mo->message); $o->set_origin = sprintf('Matrix %s (%s)',$this->mo->room,$our->ftn4d); $o->save(); return $o; } }